scrollToItem(item) {
let box = item.get_allocation_box();
- const {adjustment} = this._scrollView.vscroll;
+ const adjustment = this._scrollView.vadjustment;
let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
adjustment.ease(value, {
scrollToItem(item) {
let box = item.get_allocation_box();
- const {adjustment} = this.vscroll;
+ const adjustment = this.vadjustment;
let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
adjustment.ease(value, {
jumpToItem(item) {
let box = item.get_allocation_box();
- const {adjustment} = this.vscroll;
+ const adjustment = this.vadjustment;
let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
* @param {Clutter.Actor} actor - the actor
*/
export function ensureActorVisibleInScrollView(scrollView, actor) {
- const {adjustment} = scrollView.vscroll;
+ const adjustment = scrollView.vadjustment;
let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values();
let offset = 0;
this._scrollTimeoutId = 0;
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
- const scroll = this._scrollView.hscroll;
- this._adjustment = scroll.adjustment;
+ this._adjustment = this._scrollView.hadjustment;
this._adjustment.connect('notify::value', adj => {
const value = adj.value / adj.page_size;
this._pageIndicators.setCurrentPosition(value);
open() {
this._ensureFolderDialog();
- this.view._scrollView.vscroll.adjustment.value = 0;
+ this.view._scrollView.vadjustment.value = 0;
this._dialog.popup();
}
// Keep track of the bottom position for the current adjustment and
// force a scroll to the bottom if things change while we were at the
// bottom
- this._oldMaxScrollValue = this._scrollArea.vscroll.adjustment.value;
- this._scrollArea.vscroll.adjustment.connect('changed', adjustment => {
+ this._oldMaxScrollValue = this._scrollArea.vadjustment.value;
+ this._scrollArea.vadjustment.connect('changed', adjustment => {
if (adjustment.value === this._oldMaxScrollValue)
this.scrollTo(St.Side.BOTTOM);
this._oldMaxScrollValue = Math.max(adjustment.lower, adjustment.upper - adjustment.page_size);
}
scrollTo(side) {
- let adjustment = this._scrollArea.vscroll.adjustment;
+ let adjustment = this._scrollArea.vadjustment;
if (side === St.Side.TOP)
adjustment.value = adjustment.lower;
else if (side === St.Side.BOTTOM)
scrollview.hide();
this.add_child(scrollview);
- let vAdjust = scrollview.vscroll.adjustment;
+ const vAdjust = scrollview.vadjustment;
vAdjust.connect('changed', () => this._onAdjustScopeChanged(tabData));
vAdjust.connect('notify::value', () => this._onAdjustValueChanged(tabData));
}
_onAdjustValueChanged(tabData) {
- let vAdjust = tabData.scrollView.vscroll.adjustment;
+ const vAdjust = tabData.scrollView.vadjustment;
if (vAdjust.value < (vAdjust.upper - vAdjust.lower - 0.5))
tabData._scrolltoBottom = false;
}
_onAdjustScopeChanged(tabData) {
if (!tabData._scrollToBottom)
return;
- let vAdjust = tabData.scrollView.vscroll.adjustment;
+ const vAdjust = tabData.scrollView.vadjustment;
vAdjust.value = vAdjust.upper - vAdjust.page_size;
}
_onPan(action) {
let [dist_, dx_, dy] = action.get_motion_delta(0);
- let adjustment = this._scrollView.vscroll.adjustment;
+ let adjustment = this._scrollView.vadjustment;
adjustment.value -= (dy / this.height) * adjustment.page_size;
return false;
}
this._highlighted = index;
- let adjustment = this._scrollView.hscroll.adjustment;
+ const adjustment = this._scrollView.hadjustment;
let [value] = adjustment.get_values();
let [absItemX] = this._items[index].get_transformed_position();
let [result_, posX, posY_] = this.transform_stage_point(absItemX, 0);
}
_scrollToLeft(index) {
- let adjustment = this._scrollView.hscroll.adjustment;
+ const adjustment = this._scrollView.hadjustment;
let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values();
let item = this._items[index];
}
_scrollToRight(index) {
- let adjustment = this._scrollView.hscroll.adjustment;
+ const adjustment = this._scrollView.hadjustment;
let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values();
let item = this._items[index];